<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ config('system.admin_name') }} | {{title}}</title>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
    <link rel="stylesheet" href="/adminlte/plugins/fontawesome-free/css/all.min.css">
    <link rel="stylesheet" href="/adminlte/plugins/select2/css/select2.min.css">
    <link rel="stylesheet" href="/adminlte/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
    <link rel="stylesheet" href="/adminlte/plugins/daterangepicker/daterangepicker.css">
    <link rel="stylesheet" href="/adminlte/plugins/toastr/toastr.min.css">
    <link rel="stylesheet" href="/adminlte/css/adminlte.min.css">
    <link rel="stylesheet" href="/adminlte/plugins/filepond/filepond.min.css">
    <link rel="stylesheet" href="/adminlte/plugins/filepond/filepond-plugin-image-preview.min.css">
    {%block css%}{%endblock%}
</head>

<body class="hold-transition{%if view('main_view') == 'night'%} dark-mode{%endif%}{%if view('small_text_body') == 'on'%} text-sm{%endif%}{%if view('sidebar_fixed') == 'on'%} layout-fixed{%endif%}{%if view('top_fixed') == 'on'%} layout-navbar-fixed{%endif%}{%if view('bottom_fixed') == 'on'%} layout-footer-fixed{%endif%}{%if view('sidebar_collapse') == 'on'%} sidebar-collapse{%else%} sidebar-mini{%endif%}{%if view('main_color') != '' %} accent-{{ view('main_color') }}{%endif%}">
    <div class="wrapper">
        <div class="preloader flex-column justify-content-center align-items-center">
            <img class="{{ random(['animation__shake', 'animation__wobble']) }}" src="/AdminLogo.png" alt="{{ config('system.admin_name') }}" height="60">
        </div>

        <nav class="main-header navbar navbar-expand{%if view('top_view') == 'night'%} navbar-dark{%else%} navbar-light{%endif%}{%if view('top_color') != ''%} navbar-{{ view('top_color') }}{%else%} navbar-white{%endif%}{%if view('small_text_top') == 'on'%} text-sm{%endif%}">
            <ul class="navbar-nav">
                <li class="nav-item"><a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a></li>
                {%for v in menu(1) %}
                <li class="nav-item{%if v.current == true%} active{%endif%}">
                    <a class="nav-link{%if v.color != ''%} {{v.color}}{%endif%}" href="{{v.url}}">{{v.title}}</a>
                </li>
                {%endfor%}
            </ul>

            <ul class="navbar-nav ml-auto">
                <li class="nav-item d-none d-sm-inline-block">
                    <a class="nav-link" href="/admin/system/user-view/config"><i class="fas fa-stroopwafel"></i></a>
                </li>
                <li class="nav-item d-none d-sm-inline-block">
                    <a class="nav-link" data-widget="fullscreen" href="#" role="button"><i class="fas fa-expand-arrows-alt"></i></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-toggle="dropdown" href="#"><i class="fas fa-cogs"></i></a>
                    <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
                        <a href="#" class="dropdown-item">
                            <i class="fas fa-envelope mr-2"></i> asdf
                        </a>
                        <div class="dropdown-divider"></div>
                        <a href="#" class="dropdown-item">
                            <i class="fas fa-users mr-2"></i> 用户
                            <span class="float-right text-muted text-sm">asdf</span>
                        </a>
                    </div>
                </li>
            </ul>
        </nav>

        <aside class="main-sidebar elevation-4 {{ view('sidebar_view') }}{%if view('small_text_sidebar') == 'on'%} text-sm{%endif%}">
            <a href="/admin/index/index" class="brand-link">
                <img src="/AdminLogo.png" alt="{{ config('system.admin_name') }}" class="brand-image img-circle elevation-3" style="opacity: .8;">
                <span class="brand-text font-weight-light">{{ config('system.admin_name') }}</span>
                <sub class="brand-text font-weight-light">{{ config('system.admin_version') }}</sub>
            </a>
            <div class="sidebar">
                <nav class="mt-2">
                    <ul class="nav nav-pills nav-sidebar flex-column{%if view('sidebar_compact') == 'on'%} nav-compact{%endif%}{%if view('sidebar_indent') == 'on'%} nav-child-indent{%endif%}{%if view('sidebar_mode') == 'flat'%} nav-flat{%elseif view('sidebar_mode') == 'legacy'%} nav-legacy{%endif%}" data-widget="treeview" role="menu" data-accordion="false">
                        {%for v1 in menu(2) %}
                        <li class="nav-item{%if v1.current == true%}{%if v1.children%} menu-open{%else%} active{%endif%}{%endif%}">
                            <a href="{{v1.url}}" class="nav-link{%if v1.current == true%} active{%endif%}">
                                <i class="{{v1.icon}} {{v1.color}}"></i>
                                <p>
                                    {{v1.title}}
                                    {%if v1.children%}
                                    <i class="right fas fa-angle-left"></i>
                                    {%endif%}
                                </p>
                            </a>
                            {%if v1.children%}
                            <ul class="nav nav-treeview">
                                {%for v2 in v1.children%}
                                <li class="nav-item{%if v2.current == true%}{%if v2.children%} menu-open{%else%} active{%endif%}{%endif%}">
                                    <a href="{{v2.url}}" class="nav-link{%if v2.current == true%} active{%endif%}">
                                        <i class="{{v2.icon}} {{v2.color}}"></i>
                                        <p>
                                            {{v2.title}}
                                            {%if v2.children%}
                                            <i class="right fas fa-angle-left"></i>
                                            {%endif%}
                                        </p>
                                    </a>
                                    {%if v2.children%}
                                    <ul class="nav nav-treeview">
                                        {%for v3 in v2.children%}
                                        <li class="nav-item{%if v3.current == true%} active{%endif%}">
                                            <a href="{{v3.url}}" class="nav-link{%if v3.current == true%} active{%endif%}">
                                                <i class="{{v3.icon}} {{v3.color}}"></i>
                                                <p>{{v3.title}}</p>
                                            </a>
                                        </li>
                                        {%endfor%}
                                    </ul>
                                    {%endif%}
                                </li>
                                {%endfor%}
                            </ul>
                            {%endif%}
                        </li>
                        {%endfor%}
                    </ul>
                </nav>
            </div>
        </aside>

        <div class="content-wrapper">
            <div class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            {%block breadcrumb%}{%endblock%}
                        </div>
                        <div class="col-sm-6">
                            {%block tool%}{%endblock%}
                        </div>
                    </div>
                </div>
            </div>

            <div class="content">
                <div class="container-fluid">
                    {%block main%}{%endblock%}
                </div>
            </div>
        </div>

        <footer class="main-footer{%if view('small_text_bottom') == 'on'%} text-sm{%endif%}">
            <strong>Copyright &copy; 2023 {{ config('system.admin_name') }}.</strong> All rights reserved.
            <div class="float-right d-none d-sm-inline">
                Power by Slim 4、AdminLTE 3
            </div>
        </footer>
    </div>

    <div class="modal fade" id="modal-img-lg">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-body">
                    <img src="#" class="img-fluid">
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="modal-url-xl">
        <div class="modal-dialog modal-xl">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="embed-responsive embed-responsive-1by1">
                        <iframe class="embed-responsive-item" src="about:blank"></iframe>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="/adminlte/plugins/jquery/jquery.min.js"></script>
    <script src="/adminlte/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="/adminlte/plugins/select2/js/select2.min.js"></script>
    <script src="/adminlte/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
    <script src="/adminlte/plugins/moment/moment-with-locales.min.js"></script>
    <script src="/adminlte/plugins/daterangepicker/daterangepicker.js"></script>
    <script src="/adminlte/plugins/toastr/toastr.min.js"></script>
    <script src="/adminlte/js/adminlte.min.js"></script>
    <script src="/adminlte/plugins/filepond/filepond.min.js"></script>
    <script src="/adminlte/plugins/filepond/filepond-plugin-image-preview.min.js"></script>
    <script src="/adminlte/admin.js"></script>
    <script>
        $(function () {
            $('button[data-toggle="modal"]').on('click', function () {
                _url = $(this).data('url');
                if (_url == undefined) {
                    return;
                }
                _target = $(this).data('target');
                if ($(_target).find('iframe').length != 1) {
                    return;
                }
                $(_target).find('iframe').attr('src', _url);
            });

            $('#modal-url-xl').on('hidden.bs.modal', function (e) {
                $('#modal-url-xl').find('iframe').attr('src', 'about:blank');
            });
        });
    </script>
    {%block js%}{%endblock%}
</body>

</html>